<template>
	<div id="app">

		<router-view></router-view>
		<dateCompent @type="showType" :dateList="dateList"></dateCompent>
	</div>
</template>

<script>
	import dateCompent from './components/date.vue'
	export default {

		name: 'App',
		data() {
			return {
				dateList: [{
						dateText: '昨天',
						type: 0
					},
					{
						dateText: '今天',
						type: 1
					},
					{
						dateText: '本周',
						type: 2
					},
					{
						dateText: '本月',
						type: 3
					},
					{
						dateText: '自定义',
						type: -1
					},
				]
			}

		},
		components: {
			dateCompent
		},
		methods: {
			showType(time) {
				console.log(time)
			}
		}
	}
</script>

<style>
	#app {
		font-family: Avenir, Helvetica, Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-align: center;
		color: #2c3e50;
		margin-top: 60px;
	}
</style>
